package com.haina.shop.mapper;

import com.haina.shop.domain.Basket;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author 48077
* @description 针对表【tz_basket(购物车)】的数据库操作Mapper
* @createDate 2024-07-31 18:34:29
* @Entity com.haina.shop.domain.Basket
*/
public interface BasketMapper extends BaseMapper<Basket> {
   @Select("select * from yami_shops.tz_basket where user_id=#{userId}")
    List<Basket> selectByUserId(String userId);
    @Select("select * from yami_shops.tz_basket where user_id=#{userId} and prod_id=#{prodId}")
    Basket selectByProdId(Long userId,Long prodId);
}




